package com.port.eleport.model.plat;

import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.Parameter;

/**
 * 商品备案
 * 
 * @author jameschen
 */
@Entity
@Table(name = "plat_record", schema = "")
@DynamicInsert(true)
@DynamicUpdate(true)
public class TRecord {

	@Id
	@GeneratedValue(generator = "productfg")
	@org.hibernate.annotations.GenericGenerator(name = "productfg", strategy = "foreign", parameters = @Parameter(name = "property", value = "product"))
	@Column(name = "id")
	private String id;

	/**
	 * 备案批次
	 */
	@Column(name = "batch_")
	private String batch;

	/**
	 * 备案货号
	 */
	@Column(name = "product_no")
	private String productNo;
	/**
	 * 产地
	 */
	@Column(name = "pro_area")
	private String proArea;
	/**
	 * 品牌
	 */
	@Column(name = "brand_")
	private String brand;
	/**
	 * 品名及规格
	 */
	@Column(name = "name_and_spec")
	private String nameAndSpec;

	/**
	 * 关联的商品
	 */
	@OneToOne
	private TProduct product;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getBatch() {
		return batch;
	}

	public void setBatch(String batch) {
		this.batch = batch;
	}

	public String getProductNo() {
		return productNo;
	}

	public void setProductNo(String productNo) {
		this.productNo = productNo;
	}

	public String getProArea() {
		return proArea;
	}

	public void setProArea(String proArea) {
		this.proArea = proArea;
	}

	public String getBrand() {
		return brand;
	}

	public void setBrand(String brand) {
		this.brand = brand;
	}

	public String getNameAndSpec() {
		return nameAndSpec;
	}

	public void setNameAndSpec(String nameAndSpec) {
		this.nameAndSpec = nameAndSpec;
	}

	public TProduct getProduct() {
		return product;
	}

	public void setProduct(TProduct product) {
		this.product = product;
	}

}
